﻿using DAL.Permission;
using Model.Permission;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL.Permission
{
    public class GroupBLL
    {
        GroupDAL dal = new GroupDAL();

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string name)
        {
            return dal.Exists(name);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string name, int id)
        {
            return dal.Exists(name, id);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(GroupEntity model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(GroupEntity model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int GroupID)
        {

            return dal.Delete(GroupID);
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteList(string GroupIDlist)
        {
            return dal.DeleteList(GroupIDlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public GroupEntity GetModel(int GroupID)
        {

            return dal.GetModel(GroupID);
        }

    }
}
